home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
memory
/
emsaw41s.zip
/
TEST2P.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-06-26
|
2KB
|
90 lines
{ TEST2P.PAS }
{$N+}
program main(output);
{$I type400.pas}
{$L emsw40sp.obj}
{or emsw40p.obj}
var
A, B, C, D, two, ten, sixfo, theto, ival2, four, fivei:integer;
arin64: array [0..31] of word; arout64: array [0..31] of word;
maxdim, actelem: array[0..4] of longint;
totsiz, avsiz, te, hun, fivto:longint;
rval1, rval2:single;
ththe, eval2:extended;
begin
EMINIT;
two:=2;
SIZA (totsiz, avsiz, two);
writeln (totsiz:8,' ',avsiz:8);
fivto:=50000;
NEWA (A, fivto, two);
theto:=30000;
SETEL (A, fivto, theto);
GETEL (A, fivto, ival2);
writeln (theto:8,' ', ival2:8);
writeln('end 2 by int');
writeln;
readln;
FREEA(A);
ten:=10;
SIZA (totsiz, avsiz, ten);
writeln (totsiz:8,' ',avsiz:8);
hun:=100;
NEWA2 (B, hun, hun, ten);
ththe:=30000.0;
SETEL2 (B, hun, hun, ththe);
GETEL2 (B, hun, hun, eval2);
writeln (ththe:8,' ',eval2:8);
writeln ('end 10 by real');
writeln ;
readln;
FREEA(B);
{The rest of the program can be executed using the full version of the
package}
{
sixfo:=64;
SIZA (totsiz, avsiz, sixfo);
writeln (totsiz:8,' ',avsiz:8);
te:=10;
NEWA3 (C, te, te, te, sixfo);
arin64[1]:=30000;
SETEL3 (C, te, te, te, arin64[0]);
GETEL3 (C, te, te, te, arout64[0]);
writeln (arin64[1]:8,' ',arout64[1]:8);
writeln('end 3-D 64 by int array');
writeln;
readln;
FREEA(C);
four:=4;
SIZA(totsiz,avsiz,four);
writeln (totsiz:8,' ',avsiz:8);
maxdim[0]:=40;
maxdim[1]:=10;
maxdim[2]:=10;
maxdim[3]:=10;
maxdim[4]:=10;
fivei:=5;
NEWAN(D,maxdim[0],fivei,four);
rval1:=30000.0;
actelem[0]:=40;
actelem[1]:=10;
actelem[2]:=10;
actelem[3]:=10;
actelem[4]:=10;
SETELN(D,actelem[0], rval1);
GETELN(D,actelem[0], rval2);
writeln (rval1:8,' ',rval2:8);
writeln('end 5-D 4 by real');
writeln;
FREEA(D);
readln;
}
end.